//
// Created by sht on 2025/4/11.
//
#include <iostream>
#include <vector>
#include <unordered_set>
using namespace std;
vector<int> v(101,0);
unordered_set<int> st;
void dfs(int i,int n,int sum)
{
    if(sum > 0) st.insert(sum);
    if(i >= n)
    {
        return;
    }
    dfs(i+1,n,sum + v[i]);
    dfs(i+1,n,sum - v[i]);
}
int main()
{
    // 请在此输入您的代码
    int n;
    cin >> n;
    for (int i = 0 ; i < n ; ++i)
    {
        cin >> v[i];
    }
    dfs(0,n,0);
    cout << st.size() << endl;
    return 0;
}